#!/system/bin/sh

#############################################
CHANNEL=xiaoqiang
EXE_PATH=/system/bin/
#############################################

# 设置 socket缓存大小
echo "86364000">/proc/sys/net/core/rmem_max
#
echo '1' > /config/usb_gadget/g1/configs/b.1/MaxPower

# 下面2个主要是创建 functions

# 设置 iap, 该文件创建后会在dev 下面出现  zjinnova_iap 驱动
mkdir /config/usb_gadget/g1/functions/iap.gs0

# ncm 的设置
mkdir /config/usb_gadget/g1/functions/ncm.gs1

export LD_LIBRARY_PATH=/data/data

# 后台运行 sd_mdnsd, 不知道干什么的
$EXE_PATH/sd_mdnsd&

while true;do
    setprop sys.evilink.protocol com.nego.evilink
	if [ -f /data/data/libEViLinkCore.so ]; then
		$EXE_PATH/EViLink -c $CHANNEL
	fi
	sleep 1
done














#!/system/bin/sh

#############################################ipodconfig.xml
CHANNEL=dingwei
EXE_PATH=/system/bin/
#############################################

echo "86364000">/proc/sys/net/core/rmem_max
echo '1' > /config/usb_gadget/g1/configs/b.1/MaxPower

mkdir /config/usb_gadget/g1/functions/iap.gs0
mkdir /config/usb_gadget/g1/functions/ncm.gs1

export LD_LIBRARY_PATH=/data/data/com.zjinnova.zlink/lib

$EXE_PATH/sd_mdnsd&

while true;do
        if [ -f /data/data/com.zjinnova.zlink/lib/libspeedplay.so ]; then
                $EXE_PATH/sd_carplay -c $CHANNEL
        fi
        sleep 1
done
